This replication archive contains all data and code to replicate the results in "Measuring Political Positions from Legislative Speech" by Benjamin E. Lauderdale and Alexander Herzog. The replication materials are compressed into zip files to preserve file structure.


FILE OVERVIEW
-------------
The replication materials are split into two zip files:

(1) "data_replication.zip" (~1GB) contains the raw legislative speeches from the 29th and 30th Irish Dail and the 104-113th US Senate. The R scripts included in this archive convert the raw speeches into document feature matrices that serve as the input data for the Wordshoal method described in the paper. This archive also includes R code to replicate the data summary statistics reported in Table A1 in the online appendix.

(2) "analysis_replication.zip" (~900MB) contains all data and code necessary to reproduce the results reported in the paper. For the Irish Dail, the replication code is split into eight scripts. The first script ("1.1-generate_Dail_estimates.R") applies the Wordshoal method to the processed speech data from the 29th and 30th Dail. The second script ("1.2-combine_Dail_estimates_and_data.R") combines the estimates from the first script with external data, including party policy positions from expert surveys and information about cabinet positions. The remaining scripts (1.3-1.8) contain the code necessary to reproduce all numbers, tables and figures reported in the paper and online appendix. For the US Senate, the replication code is provided in a single file ("2-generate_Senate_estimates_and_plots.R"). This script applies the Wordshoal method to the processed speech data from the 104-113th Senate and contains the code necessary to reproduce all numbers, tables and figures reported in the paper and online appendix.


DATA SOURCES
------------
Speeches for Ireland were retrieved from "DPSI: Database of Parliamentary Speeches in Ireland" (Alexander Herzog and Slava Mikhaylov, 2013, data repository available at http://www.alexherzog.net). Information in this database was collected from the Houses of the Oireachtas (the Irish national parliament) and is distributed under the Public Sector Information (PSI) Licence for Re-Use of Information, No. 2005/08/01. Speeches from the US Senate were collected from the digital version of the Congressional Record using a web scraper and parser written in Python.
